package com.ruoyi.finance.service.impl;

import com.ruoyi.finance.domain.Invoices;
import com.ruoyi.finance.mapper.InvoicesMapper;
import com.ruoyi.finance.service.IInvoicesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 发票Service业务层处理
 * 
 * @author liuyu
 * @date 2024-10-29
 */
@Service
public class InvoicesServiceImpl implements IInvoicesService 
{
    @Autowired
    private InvoicesMapper invoicesMapper;

    /**
     * 查询发票
     * 
     * @param id 发票主键
     * @return 发票
     */
    @Override
    public Invoices selectInvoicesById(Long id)
    {
        return invoicesMapper.selectInvoicesById(id);
    }

    /**
     * 查询发票列表
     * 
     * @param invoices 发票
     * @return 发票
     */
    @Override
    public List<Invoices> selectInvoicesList(Invoices invoices)
    {
        return invoicesMapper.selectInvoicesList(invoices);
    }

    /**
     * 新增发票
     * 
     * @param invoices 发票
     * @return 结果
     */
    @Override
    public int insertInvoices(Invoices invoices)
    {
        return invoicesMapper.insertInvoices(invoices);
    }

    /**
     * 修改发票
     * 
     * @param invoices 发票
     * @return 结果
     */
    @Override
    public int updateInvoices(Invoices invoices)
    {
        return invoicesMapper.updateInvoices(invoices);
    }

    /**
     * 批量删除发票
     * 
     * @param ids 需要删除的发票主键
     * @return 结果
     */
    @Override
    public int deleteInvoicesByIds(Long[] ids)
    {
        return invoicesMapper.deleteInvoicesByIds(ids);
    }

    /**
     * 删除发票信息
     * 
     * @param id 发票主键
     * @return 结果
     */
    @Override
    public int deleteInvoicesById(Long id)
    {
        return invoicesMapper.deleteInvoicesById(id);
    }
}
